const common = require('./webpack.common')
const { merge } = require('webpack-merge')
const webpack = require('webpack')

module.exports = merge(common, {
    mode: 'development',
    devtool: 'cheap-module-eval-source-map',
       // 配置服务端目录和端口
    devServer: {
        port: 3002,
        hot: true
    },
    plugins: [
        new webpack.HotModuleReplacementPlugin(), // 模块热重载
        new webpack.NoEmitOnErrorsPlugin(), // 减少不需要信息的展示
    ]
})